<script>
import Loading from "@/components/loading/index.vue";
import { defineComponent } from "vue";

export default defineComponent({
  components: {
    Loading,
  },
  created() {
    this.redirect();
  },
  updated() {
    this.redirect();
  },
  methods: {
    redirect() {
      const path = this.$route.params.path;
      const query = this.$route.query;
      this.$router.replace({
        path: "/" + (typeof path === "string" ? path : path.join("/")),
        query,
      });
    },
  },
});
</script>

<template>
  <Loading />
</template>